<div class="r0 p0 col-xs-12"  ng-init="queryInterfaceList()">
    <div class="col-xs-12 main-nav">
        <div class="btn-group btn-group-sm r3 fl mr10">
            <a type="button" class="btn btn-default" onclick="history.back(-1);"><i
                    class="iconfont mt-3">&#xe697;&nbsp;</i>后退</a>

            <a type="button" class="btn btn-default" id="refresh" ng-click="queryInterfaceList(list.page.currentPage)"><i
                    class="iconfont mt-3">&#xe6aa;&nbsp;</i>刷新</a>
            <a type="button" ng-class="{true: 'btn btn-default btn-sm', false:'btn btn-default btn-sm disabled'}[isProjectUser('addInter')]"
               ng-href="#/user/interface/edit?dataType=interface&id=NULL&menu_a=menu-project&menu_b=menu_interface&projectName={{$stateParams.projectName}}&projectId={{$stateParams.projectId}}&moduleId={{$stateParams.moduleId}}">
                <i class="iconfont mt-3">&#xe604;</i>&nbsp;新增接口
            </a>
            <a type="button"
               ng-class="{true: 'btn btn-default btn-sm', false:'btn btn-default btn-sm disabled'}[isProjectUser('delInter')]"
               ng-click="del('user/interface/delete.do?ids='+deleteIds,'','确认批量删除选中的接口？')">
                <i class="iconfont mt-3">&#xe69d;</i>&nbsp;批量删除
            </a>
        </div>

        <div class="form-group w200 fl mb0">
            <label class="sr-only">名称</label>
            <div class="input-group btn-group-xs">
                <div class="input-group-addon main-bg CFFF b0 f12">名称</div>
                <input type="text" class="form-control input-sm dis-in-blo w120 bl0" placeholder="名称"
                       id="interfaceName" ng-value="$stateParams.interfaceName">
            </div>
        </div>
        <div class="form-group w200 fl mb0 ml10">
            <label class="sr-only">URL</label>
            <div class="input-group btn-group-xs">
                <div class="input-group-addon main-bg CFFF b0 f12">URL</div>
                <input type="text" class="form-control input-sm dis-in-blo w120 bl0" placeholder="URL" id="url"
                       ng-value="$stateParams.url">
            </div>
        </div>

        <button type="button" class="btn btn-adorn btn-sm fl ml10" ng-click="queryInterfaceList(1, true);">
            <i class="iconfont mt-3">&#xe6ac;</i>&nbsp;查询
        </button>
    </div>

    <div class="col-xs-12 p20 mt60">
        <div class="BGFFF p15">
            <table class="table table-hover table-striped">
                <thead>
                <tr class="f14 C000 fw500">
                    <td class="w50">
                        <input type="checkbox" id="select-all" ng-click="selectAll('select-all','deleteIds',interfaces)">
                    </td>
                    <td class="tl">Method / 版本 / 名称 / URL</td>
                    <td class="w120">最后修改时间</td>
                    <td class="w250">
                        操作
                        <span class="p0 f14 cursor mr20" onclick="tooltip('status-tip')" id="status-tip" data-toggle="tooltip" data-placement="right"
                                title="「模板:设置为模板后，新建接口时将根据该模板接口初始化接口内容」">
					        <i class="iconfont adorn-color">&#xe6a3;</i>
                        </span>
                    </td>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="item in interfaces">
                    <td><input type="checkbox" name="deleteIds" ng-click="checkboxSelect('deleteIds',item.id);"></td>
                    <td class="cursor" ng-click="go('user/interface/detail?id=' +item.id+ '&pageName=接口详情&dataType=interface&menu_a=menu-project&menu_b=menu_interface&projectName=' +
                        item.projectName + '&projectId=' + item.projectId + '&moduleId=' + $stateParams.moduleId)">

                        <div class="C000 f14">
                            <button class="badge f12 fn o5 pt2 pb2 btn-{{item.method}}">{{item.method}}</button>
                            <span class="badge f12 fn main-bg o5">{{item.version}}</span>
                            {{item.interfaceName| cut:true:40:' ...'}}
                        </div>
                        <div class="C999 f10 mt5">
                            {{item.fullUrl}}
                        </div>
                    </td>
                    <td>{{item.updateTimeStr}}</td>
                    <td class="f12">
                        <a ng-click="stopPropagation($event);"
                           ng-class="{true: 'cursor btn btn-xs btn-default', false:'btn btn-xs btn-default disabled'}[isProjectUser('modInter')]"
                           ng-href="#/user/interface/edit?pageName=编辑接口&dataType=interface&id={{item.id}}&menu_a=menu-project&menu_b=menu_interface&projectName={{item.projectName}}&projectId={{item.projectId}}&moduleId={{$stateParams.moduleId}}">
                            <i class="iconfont f12">&#xe69e;</i>
                        </a>

                       <!-- <a class="f12 text-primary mr10 cursor" ng-if="showOperation('PROJECT',$stateParams.projectId)"
                           ng-click="detail('编辑【'+item.interfaceName+'】',1100,'user/interface/detail.do?id='+item.id,'',initEditInterFace)">
                            <i class="iconfont f12">&#xe69e;修改</i>
                        </a> -

                        <a class="f12 cursor btn btn-xs btn-default"
                           ng-click="stopPropagation($event);"
                           ng-href="#/user/interface/debug?pageName=接口调试&dataType=interface&menu_b=menu_interface&menu_a=menu-project&projectName={{item.projectName}}&projectId={{item.projectId}}&moduleId={{$stateParams.moduleId}}&id={{item.id}}" class="f12 btn btn-default btn-xs">
                            调试
                        </a>-->

                        <a class="f12 cursor btn-main btn btn-xs"
                           ng-click="stopPropagation($event);"
                           ng-href="index.do#/interface/detail?projectId={{item.projectId}}&id={{item.id}}"
                           target="_blank">
                            预览
                        </a>

                        <a class="f12 cursor btn btn-xs btn-default"
                           ng-click="detail('拷贝【'+item.interfaceName+'】',600,'user/interface/detail.do?id='+item.id,'',copyInterface);stopPropagation($event);">
                            拷贝
                        </a>

                        <a ng-if="item.template" ng-class="{true: 'cursor btn btn-xs btn-danger', false:'btn btn-xs btn-danger disabled'}[isProjectUser('modModule')]"
                           ng-click="sendRequest('user/module/setTemplate.do?id='+item.id);stopPropagation($event);">
                            <span class="f12">取消模板</span>
                        </a>

                        <a ng-if="!item.template" ng-class="{true: 'cursor btn btn-xs btn-success', false:'btn btn-xs btn-success disabled'}[isProjectUser('modModule')]"
                           ng-click="sendRequest('user/module/setTemplate.do?id='+item.id);stopPropagation($event);">
                            <span class="f12">设为模板</span>
                        </a>


                        <a ng-class="{true: 'mr5 cursor btn btn-xs btn-danger', false:'mr5 btn btn-xs btn-danger disabled'}[isProjectUser('delInter')]"
                           ng-click="del('user/interface/delete.do?id='+item.id,item.interfaceName);stopPropagation($event);">
                            <i class="iconfont f12">&#xe69d;</i>
                        </a>
                        <!--<div class="w50 fr tl" ng-if="showOperation('PROJECT',item.projectId)">
                            <a class="f12 text-danger mr10 cursor" title="向上移" ng-click="changeSequence('user/interface/changeSequence.do',item.id,list[$index-1].id)" ng-if="$index>0">
                                <i class="iconfont f12">&#xe623;</i>
                            </a>
                            <a class="f12 text-danger mr10 cursor" title="向下移" ng-click="changeSequence('user/interface/changeSequence.do',item.id,list[$index+1].id)" ng-if="$index<list.length-1">
                                <i class="iconfont f12">&#xe624;</i>
                            </a>
                        </div>-->
                    </td>
                </tr>

                </tbody>
            </table>
            <div ui-view="page" ng-init="callBackMethod = 'queryInterfaceList'; modelKey='interfaces'"></div>
        </div>
    </div>
</div>
<div class="cb"></div>

